use "C:\Users\Andy baker\OneDrive - UCB-O365\My Documents\Research\Paper Book Networks\Chapter 4 Campaigns\Data\Chapter 4 Aware CIs.dta", clear

gen upper=pointestimate+1.9645*se
gen lower=pointestimate-1.9645*se
gen upper01=pointestimate_01+1.9645*se_01
gen lower01=pointestimate_01-1.9645*se_01
gen label=-.71

replace n=9-n

*Figure 4.9B
twoway (scatter  n pointestimate , mcolor(black))  (rcap upper lower n, color(black) horizontal ) ///
(scatter  n pointestimate_01, mcolor(black) msymbol(S)) (rcap upper01 lower01 n, color(black) horizontal ) , ///
xtitle("{bf:Model-Predicted Change in Probability}" "(upon changing respondent's political knowledge from min to max)") ///
graphregion(color(white)) plotregion(lstyle(yxline) lcolor(black)) ytitle("{bf:Country, Year, and Sample}") ///
legend(off) title("{bf: Dependent Variable: Changed Vote Preference}", size(medsmall) color(black)) ///
xline(0, lcolor(black)) ymlab(8 "Always Opinionated" 7 "≥Once Opinionated" 6 "Always Opinionated" 5 "≥Once Opinionated" 4 "Always Opinionated" 3 "≥Once Opinionated" 2 "Always Opinionated" 1 "≥Once Opinionated"  , angle(horizontal) labsize(small)) ///
ylab(7.5 "Brazil 2002" 5.5 "Brazil 2006" 3.5 "Brazil 2014"  1.5 "Mexico 2006 ", angle(vertical) notick labgap(26)) ///
ytick(2.5 4.5 6.5, tlength(30)) ylab(,nogrid) xlab(-.6 -.4 -.2 0, grid) yline(2.5 4.5 6.5, lcolor(black)) ///
text(1 -.57 "{it:N}=1,053", size(small)) text(2 -.57 "{it:N}=914", size(small))  text(3 -.57 "{it:N}=697", size(small)) ///
text(4 -.57 "{it:N}=359", size(small)) text(5 -.57 "{it:N}=1,513", size(small))  text(6 -.57 "{it:N}=1,172", size(small)) ///
text(7 -.57 "{it:N}=1,761", size(small)) text(8 -.57 "{it:N}=1,268", size(small))  

graph export "C:\Users\Andy baker\OneDrive - UCB-O365\My Documents\Research\Paper Book Networks\Chapter 4 Campaigns\Figures\Aware CIs.tif", as(tif) replace
graph export "C:\Users\Andy baker\OneDrive - UCB-O365\My Documents\Research\Paper Book Networks\Publishers\Final Manuscript\Final Figures\BAR4_9B.tif", as(tif) replace width(1500)
graph export "C:\Users\Andy baker\OneDrive - UCB-O365\My Documents\Research\Paper Book Networks\Publishers\Final Manuscript\Final Figures\BAR4_9B.pdf", as(pdf) replace 
*(scatter var10 label, mlabel(var14) mlabpos(3) mlabcolor(black) msym(i)) 
